package com.hcy.commonn;

import com.hcy.common.dto.request.DirectionRequestDTO;
import com.hcy.common.dto.request.PushMsgRequestDTO;
import com.hcy.common.dto.request.TrackInfoRequestDTO;
import com.hcy.common.dto.response.CallCarConfigDTO;
import com.hcy.common.dto.response.GaoDeGfidsResponseDTO;
import com.hcy.common.dto.response.MessageResponseDTO;
import com.hcy.common.dto.response.TrackInfoResponseDTO;
import com.hcy.rabbitbasicmodel.model.ResponseData;
import com.hcy.rabbitbasicmodel.signl.Add;
import com.hcy.rabbitbasicmodel.signl.Delete;
import com.hcy.rabbitbasicmodel.signl.Insert;
import com.hcy.rabbitbasicmodel.signl.Query;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author huchenying
 * @Description
 * @Date 2021/12/31 14:45
 */
@FeignClient(name = "common-api")
public interface CommonInfoClient {
    @PostMapping("/location/getTrackByTrid")
    ResponseData<TrackInfoResponseDTO> getTrackByTrid(@Validated @RequestBody TrackInfoRequestDTO requestDTO);
    @GetMapping("/location/direction")
    ResponseData<Object> direction(@Validated @RequestBody DirectionRequestDTO directionRequestDTO);
    @PostMapping("/location/getBelongTopic")
    ResponseData<String> getBelongTopic(@Validated @RequestBody DirectionRequestDTO directionRequestDTO);
    @PostMapping("/location/getAllTopic")
    ResponseData<List<GaoDeGfidsResponseDTO>> getAllTopic();
    @PostMapping("/common-info/pushMessage")
    ResponseData<Object> pushMessage(@Validated(Insert.class) @RequestBody PushMsgRequestDTO requestDTO);
    @PostMapping("/common-info/queryMessage")
    ResponseData<List<MessageResponseDTO>> queryMessage(@Validated(Query.class) @RequestBody PushMsgRequestDTO requestDTO);
    @PostMapping("/operator/getCallConfigList")
    ResponseData<List<CallCarConfigDTO>> getCallConfigList();
    @PostMapping("/operator/insertOrUpdateCallConfig")
    ResponseData<CallCarConfigDTO> insertOrUpdateCallConfig(@Validated(Add.class) @RequestBody CallCarConfigDTO callCarConfigDTO);
    @PostMapping("/operator/deleteCallConfig")
    ResponseData<Object> deleteCallConfig(@Validated(Delete.class) @RequestBody CallCarConfigDTO callCarConfigDTO);
    @PostMapping("/operator/getGridConfig")
    ResponseData<List<GaoDeGfidsResponseDTO>> getGridConfig();
    @PostMapping("/operator/insertOrUpdateGridConfig")
    ResponseData<GaoDeGfidsResponseDTO> insertOrUpdateGridConfig(@Validated(Add.class) @RequestBody GaoDeGfidsResponseDTO gaodeGfids);
    @PostMapping("/operator/deleteGridConfig")
    ResponseData<Object> deleteGridConfig(@Validated(Delete.class) @RequestBody GaoDeGfidsResponseDTO gaodeGfids);
    @PostMapping("/operator/getPriceConfig")
     ResponseData<Object> getPriceConfig();
    @PostMapping("/operator/updatePriceConfig")
    ResponseData<Object> updatePriceConfig();
}
